//
//  NSTreeController+WCExtensions.h
//  WabbitCode
//
//  Created by William Towe on 1/28/09.
//  Copyright 2009 Revolution Software. All rights reserved.
//

#import <Cocoa/Cocoa.h>


@class WCProject;

@interface NSTreeController (WCExtensions)
- (NSTreeNode *)selectedNode;
- (id)selectedRepresentedObject;
- (NSArray *)selectedRepresentedObjects;

- (NSTreeNode *)treeNodeForRepresentedObject:(id)object;
- (NSArray *)treeNodesForRepresentedObjects:(NSArray *)objects;

- (NSArray *)flattenedNodes;

- (NSTreeNode *)treeNodeAtIndexPath:(NSIndexPath *)indexPath;
- (NSArray *)treeNodesAtIndexPaths:(NSArray *)indexPaths;

- (NSIndexPath *)indexPathForRepresentedObject:(id)object;
- (NSArray *)indexPathsForRepresentedObjects:(NSArray *)objects;

- (void)selectRepresentedObject:(id)object;
- (void)selectRepresentedObjects:(NSArray *)objects;
- (void)selectTreeNode:(NSTreeNode *)node;
- (void)selectTreeNodes:(NSArray *)nodes;

- (void)removeSelectedObjects;
- (void)removeTreeNode:(NSTreeNode *)node;
- (void)removeTreeNodes:(NSArray *)nodes;
- (void)removeRepresentedObject:(id)object;
- (void)removeRepresentedObjects:(NSArray *)objects;

- (void)updateChildNodeIndexesForTreeNode:(NSTreeNode *)item inProject:(WCProject *)project;
@end
